function findMostWord (article) {
  if (!article) { // 如果这个没有article就返回空字符串
    return ''
  }
  article = article.trim().toLowerCase() // 转换成小写
  let wordList = article.match(/[a-z]+/g) // 找出所有的单个单词
  console.log(wordList);
  let maxNum = 0
  let maxWord = ''
  let visited = []
  article = ' ' + wordList.join('  ') + ' '
  wordList.forEach((word) => {
    if (visited.indexOf(word) < 0) {
      visited.push(word)
      let reg = new RegExp(' ' + word + ' ', 'g') // 生成正则
      let len = article.match(reg).length // 匹配的个数
      if (len > maxNum) {
        maxNum = len
        maxWord = word
      }
    }
  })
  return maxWord + ":" + maxNum






  // // 合法性判断
  // if (!article) return; // 如果这个没有article 就直接返回
  // // 参数处理
  // article = article.trim().toLowerCase(); // 将其转换成小写
  // let wordList = article.match(/[a-z]+/g), // 正则表达式 匹配所有的单独的单词
  //   visited = [], // 访问过数组
  //   maxNum = 0, // 最大的个数
  //   maxWord = ""; // 最大的单词
  // article = " " + wordList.join("  ") + " "; // 生成新的article 中间是两个空格 两边是一个空格
  // // 遍历判断单词出现次数
  // wordList.forEach(function (item) { // 遍历列表
  //   if (visited.indexOf(item) < 0) { // 如果没有记录过
  //     // 加入 visited 
  //     visited.push(item); // 加入到访问数组中
  //     let word = new RegExp(" " + item + " ", "g"); // 生成一个新的表达式 是左右是空格里面是单词 而且是全局匹配
  //     num = article.match(word).length; // 得到他的长度
  //     if (num > maxNum) { // 如果长度大于最大的长度
  //       maxNum = num;
  //       maxWord = item; // 修改最大的长度和最大的单词
  //     }
  //   }
  // });
  // return maxWord + "  " + maxNum; // 输出这个最大的长度和最大的单词
}
let article = `"For the last century the biggest bar fight in science has been between Albert Einstein and himself," reports New York Times:
On one side is  Einstein who in 1915 conceived general relativity, which describes gravity as  warping of space-time by matter and energy. That theory predicted that space-time could bend, expand, rip, quiver like a bowl of Jell-O and disappear into those bottomless pits of nothingness known as black holes. On side is  Einstein who, startin 1905, laid the foundation for quantum mechanics,  nonintuitive rules that inject randomness into the world — rules that Einstein never accepted. According to quantum mechanics, a subatomic particle like an electron can be anywhere and everywhere at once, and a cat can be both alive and dead until it is observed. God doesn't play dice, Einstein often complained.

Gravity rules outer space, shaping galaxies and indeed whole universe, whereas quantum mechanics rules inner space, arena of atoms and elementary particles. The two realms long seemed to have nothing to do with each other; this left scientists ill-equipped to understand what happens in an extreme situation like a black hole or beginning of universe.

But a blizzard of research in last decade on inner lives of black holes has revealed unexpected connections between two views of cosmos. The implications are mind-bending, including the possibility that our three-dimensional universe — and we ourselves — may be holograms, like the ghostly anti-counterfeiting images that appear on some credit cards and drivers licenses. In this version of the cosmos, there is no difference between here and there, cause and effect, inside and outside or perhaps even then and now; household cats can be conjured in empty space. We can all be Dr. Strange.

"It may be too strong to say that gravity and quantum mechanics are exactly the same thing," Leonard Susskind of Stanford University wrote in a paper in 2017. "But those of us who are paying attention may already sense that the two are inseparable, and that neither makes sense without the other."

That insight, Dr. Susskind and his colleagues hope, could lead to a theory that combines gravity and quantum mechanics — quantum gravity — and perhaps explains how the universe began.`
console.log(findMostWord(article));